<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>封装取消冒泡的函数stopBubble(event)</title>
</head>
<body>

<script>
    function stopBubbleFn(event) {
        if(event.stopPropagation()){
            event.stopPropagation();
        }else {
            event.cancelBubble = true;
        }
    }
</script>

</body>
</html>
